Skip to content

HYPERFLEET-299 - docs: Add search and filtering documentation#63

Open
Mischulee wants to merge 1 commit intoopenshift-hyperfleet:mainfrom
Mischulee:HYPERFLEET-299
Open

HYPERFLEET-299 - docs: Add search and filtering documentation#63
Mischulee wants to merge 1 commit intoopenshift-hyperfleet:mainfrom
Mischulee:HYPERFLEET-299

Conversation

@Mischulee
Copy link
Contributor

@Mischulee Mischulee commented Mar 3, 2026

https://issues.redhat.com/browse/HYPERFLEET-299

Summary by CodeRabbit

  • Documentation
    • Added comprehensive search and filtering guide with Tree Search Language (TSL) syntax, operators, and examples.
    • Updated README examples to reflect current query syntax.
    • Reorganized API documentation to streamline search references and reduce inline documentation verbosity.
    • Added cross-references between documentation files for improved navigation.

@openshift-ci openshift-ci bot requested review from ciaranRoche and mbrudnoy March 3, 2026 16:48
@openshift-ci
Copy link

openshift-ci bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rh-amarin for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This pull request consolidates and reorganizes API search and filtering documentation across multiple files. The changes fix incorrect label references in code examples (labels.env → labels.environment), create a new comprehensive search.md guide documenting Tree Search Language (TSL) syntax and operators, and refactor README.md and api-resources.md to defer detailed search documentation to the new dedicated guide while maintaining essential cross-references. No functional changes or new features are introduced.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • ciaranRoche
  • mbrudnoy
  • aredenba-rh
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding comprehensive search and filtering documentation across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/search.md`:
- Line 100: The docs incorrectly list `Unknown` as a valid status for resource
conditions; update the search documentation text so Condition types remain
PascalCase (`Ready`, `Available`, `Progressing`) but the allowed status for
synthesized resource conditions uses only `True` and `False` to match
`ResourceConditionStatus`, and note that `Unknown` is valid only for
`AdapterConditionStatus` (adapter status reports). Replace any examples or lists
that include `Unknown` for resource conditions with `True`/`False` and add a
brief clarifying sentence that `Unknown` applies only to
`AdapterConditionStatus`.
- Line 100: Add the missing condition type "Progressing" to the documented list
of condition types (alongside "Available", "Ready", "Applied", and "Health") in
the API resources documentation where condition types and their allowed statuses
are described; ensure "Progressing" is listed in PascalCase and mention that
status values remain "True", "False", or "Unknown" so the docs match the
code/tests that reference Progressing.
- Around line 24-26: The document currently mixes operator casing; update all
instances of logical operators in the Complex Queries section and examples to
match the operator table by using lowercase `and`, `or`, and `not` consistently
(replace any `AND`/`OR`/`NOT` usages in the "Complex Queries" examples and
related examples showing query expressions with the lowercase forms `and`, `or`,
`not`) so the operator table and examples are standardized.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 664097e and 12c6de1.

📒 Files selected for processing (3)
  • README.md
  • docs/api-resources.md
  • docs/search.md

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Makefile`:
- Around line 253-254: The Makefile contains duplicated environment assignments
for HYPERFLEET_CLUSTER_ADAPTERS and HYPERFLEET_NODEPOOL_ADAPTERS with trailing
backslashes that are not followed by commands, producing dangling shell
continuations that break targets like run and run-no-auth; remove the duplicate
post-serve lines or delete the trailing backslashes after the duplicated
HYPERFLEET_CLUSTER_ADAPTERS and HYPERFLEET_NODEPOOL_ADAPTERS entries so each
environment assignment is either part of a continued recipe line or stands alone
without a backslash (check the blocks around the serve target and the .PHONY:
run declaration to ensure no dangling continuations remain).

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4982aa and 8370e3e.

📒 Files selected for processing (4)
  • Makefile
  • README.md
  • docs/api-resources.md
  • docs/search.md
✅ Files skipped from review due to trivial changes (1)
  • docs/search.md


Query resources by status conditions: `status.conditions.<Type>='<Status>'`

Condition types must be PascalCase (`Ready`, `Available`) and status must be `True` or `False` for resource conditions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in conditionsNodeConverter explicitly restricts status.conditions. fields to only the = operator:

  if n.Func != tsl.EqOp {
      return nil, errors.BadRequest("only equality operator (=) is supported for condition queries")
  }

This means:

  • status.conditions.Ready!='False' → returns a 400 error
  • not status.conditions.Ready='True' → silently returns empty results (the condition extraction replaces the node with 1 = 1, so not (1 = 1) is always false)

But the document mentions !=, <, <=, >, >=, not, in as supported operators.

The "Status Condition Queries" section should mention that
status.conditions. fields only support the = operator. Other operators
(!=, <, >, in, not, etc.) will either return a 400 error or silently produce
incorrect results.

Suggested addition after line 100:

Suggested change
Condition types must be PascalCase (`Ready`, `Available`) and status must be `True` or `False` for resource conditions.
Condition types must be PascalCase (`Ready`, `Available`) and status must be `True` or `False` for resource conditions.
**Note:** Only the `=` operator is supported for condition queries. Other operators (`!=`, `<`, `>`, `in`, etc.) will return an error. Use `not` with conditions cautiously — `not status.conditions.Ready='True'` does not work as expected.

Anyway, besides the note, I've opened a jira ticket to fix the bug: https://issues.redhat.com/browse/HYPERFLEET-709

HYPERFLEET-709 will also update this document when it gets resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants